package com.aidex.system.service;

import com.aidex.common.core.domain.entity.SysRole;
import com.aidex.common.core.service.BasicService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.util.List;
import java.util.Set;

public interface SysRoleService extends BasicService<SysRole> {

    int batchInsert(List<SysRole> roleList);

    Set<String> selectRolePermissionByUserId(String userId);

    List<SysRole> selectListByUser(QueryWrapper<SysRole> wrapper);

    void checkRoleNameUnique(SysRole role);

    void checkRoleKeyUnique(SysRole role);

    void checkRoleAllowed(SysRole role);

    int countUserRoleByRoleId(String roleId);

    int authDataScope(SysRole role);

    int findMaxSort();

    int deleteRoleUser(String roleId, String[] userIds);

    int saveRolePortlet(SysRole role);

    void checkRoleDataScope(String roleId);
}
